﻿using System;
using System.Collections.Generic;
using Character;
using UnityEngine;

// Token: 0x02000214 RID: 532
public class H_Expression : MonoBehaviour
{
	// Token: 0x06000E98 RID: 3736 RVA: 0x0005B798 File Offset: 0x00059998
	public void Setup()
	{
		H_Expression.Setup_Dictionary(this.eyeDic, this.eyeList);
		H_Expression.Setup_Dictionary(this.mouthDic, this.mouthList);
		for (int i = 0; i < 4; i++)
		{
			this.datas[i] = new H_ExpressionData(this, this.expressionList[i]);
		}
	}

	// Token: 0x06000E99 RID: 3737 RVA: 0x0005B7F0 File Offset: 0x000599F0
	public string EyeName(string name)
	{
		if (this.eyeDic.ContainsKey(name))
		{
			return this.eyeDic[name];
		}
		GlobalData.Debug_LogError("眼睛的表情：" + name + " 找不到");
		return "Eye_Def";
	}

	// Token: 0x06000E9A RID: 3738 RVA: 0x0005B82C File Offset: 0x00059A2C
	public string MouthName(string name)
	{
		if (this.mouthDic.ContainsKey(name))
		{
			return this.mouthDic[name];
		}
		GlobalData.Debug_LogError("嘴巴的表情：" + name + " 找不到");
		return "Mouth_Def";
	}

	// Token: 0x06000E9B RID: 3739 RVA: 0x0005B868 File Offset: 0x00059A68
	private static void Setup_Dictionary(Dictionary<string, string> dic, TextAsset text)
	{
		CustomDataListLoader customDataListLoader = new CustomDataListLoader();
		customDataListLoader.Load(text);
		int attributeNo = customDataListLoader.GetAttributeNo("anime");
		int attributeNo2 = customDataListLoader.GetAttributeNo("name");
		for (int i = 0; i < customDataListLoader.GetDataNum(); i++)
		{
			string data = customDataListLoader.GetData(attributeNo, i);
			string data2 = customDataListLoader.GetData(attributeNo2, i);
			dic.Add(data2, data);
		}
	}

	// Token: 0x06000E9C RID: 3740 RVA: 0x0005B8D0 File Offset: 0x00059AD0
	public H_ExpressionData.Data ChangeExpression(Human human, string voiceFile, H_Parameter param)
	{
		if (!this.isUpdate)
		{
			return null;
		}
		if (human.sex == SEX.FEMALE)
		{
			Female female = human as Female;
			return this.datas[(int)female.HeroineID].ChangeExpression(human, voiceFile, param, this.duration);
		}
		return null;
	}

	// Token: 0x06000E9D RID: 3741 RVA: 0x0005B91C File Offset: 0x00059B1C
	public H_ExpressionData.Data ChangeExpression(Human human, H_Expression.TYPE type, H_Parameter param)
	{
		if (!this.isUpdate)
		{
			return null;
		}
		if (human.sex == SEX.FEMALE)
		{
			Female female = human as Female;
			return this.datas[(int)female.HeroineID].ChangeExpression(human, type, param, this.duration);
		}
		return null;
	}

	// Token: 0x04000F0F RID: 3855
	[SerializeField]
	private TextAsset[] expressionList = new TextAsset[4];

	// Token: 0x04000F10 RID: 3856
	private H_ExpressionData[] datas = new H_ExpressionData[4];

	// Token: 0x04000F11 RID: 3857
	[SerializeField]
	private TextAsset eyeList;

	// Token: 0x04000F12 RID: 3858
	[SerializeField]
	private TextAsset mouthList;

	// Token: 0x04000F13 RID: 3859
	[SerializeField]
	private float duration = 0.2f;

	// Token: 0x04000F14 RID: 3860
	private Dictionary<string, string> eyeDic = new Dictionary<string, string>();

	// Token: 0x04000F15 RID: 3861
	private Dictionary<string, string> mouthDic = new Dictionary<string, string>();

	// Token: 0x04000F16 RID: 3862
	[SerializeField]
	private bool isUpdate = true;

	// Token: 0x02000215 RID: 533
	public enum STATE
	{
		// Token: 0x04000F18 RID: 3864
		RESIST = 1,
		// Token: 0x04000F19 RID: 3865
		FLIP,
		// Token: 0x04000F1A RID: 3866
		PAIN = 4,
		// Token: 0x04000F1B RID: 3867
		WEAKNESS = 8,
		// Token: 0x04000F1C RID: 3868
		AHE = 16
	}

	// Token: 0x02000216 RID: 534
	public enum TYPE
	{
		// Token: 0x04000F1E RID: 3870
		BREATH,
		// Token: 0x04000F1F RID: 3871
		TALK,
		// Token: 0x04000F20 RID: 3872
		PANT_TALK_LO,
		// Token: 0x04000F21 RID: 3873
		PANT_TALK_HI,
		// Token: 0x04000F22 RID: 3874
		PANT_LO_NORMAL,
		// Token: 0x04000F23 RID: 3875
		PANT_LO_HIT,
		// Token: 0x04000F24 RID: 3876
		PANT_HI_NORMAL,
		// Token: 0x04000F25 RID: 3877
		PANT_HI_HIT,
		// Token: 0x04000F26 RID: 3878
		LICK_LO_NORMAL,
		// Token: 0x04000F27 RID: 3879
		LICK_LO_HIT,
		// Token: 0x04000F28 RID: 3880
		LICK_HI_NORMAL,
		// Token: 0x04000F29 RID: 3881
		LICK_HI_HIT,
		// Token: 0x04000F2A RID: 3882
		FELLATIO_LO_NORMAL,
		// Token: 0x04000F2B RID: 3883
		FELLATIO_LO_HIT,
		// Token: 0x04000F2C RID: 3884
		FELLATIO_HI_NORMAL,
		// Token: 0x04000F2D RID: 3885
		FELLATIO_HI_HIT,
		// Token: 0x04000F2E RID: 3886
		IRRUMATIO_LO_NORMAL,
		// Token: 0x04000F2F RID: 3887
		IRRUMATIO_LO_HIT,
		// Token: 0x04000F30 RID: 3888
		IRRUMATIO_HI_NORMAL,
		// Token: 0x04000F31 RID: 3889
		IRRUMATIO_HI_HIT,
		// Token: 0x04000F32 RID: 3890
		JOB_LO,
		// Token: 0x04000F33 RID: 3891
		JOB_HI,
		// Token: 0x04000F34 RID: 3892
		INSERT,
		// Token: 0x04000F35 RID: 3893
		INSERT_FELLATIO,
		// Token: 0x04000F36 RID: 3894
		INSERT_IRRUMATIO,
		// Token: 0x04000F37 RID: 3895
		EJACULATION_IN_LIKE,
		// Token: 0x04000F38 RID: 3896
		EJACULATION_IN_NORMAL,
		// Token: 0x04000F39 RID: 3897
		EJACULATION_OUT_LIKE,
		// Token: 0x04000F3A RID: 3898
		EJACULATION_OUT_NORMAL,
		// Token: 0x04000F3B RID: 3899
		EJACULATION_MOUTH_LIKE,
		// Token: 0x04000F3C RID: 3900
		EJACULATION_MOUTH_NORMAL,
		// Token: 0x04000F3D RID: 3901
		XTC,
		// Token: 0x04000F3E RID: 3902
		XTC_AFTER_BREATH,
		// Token: 0x04000F3F RID: 3903
		INEJA_AFTER_BREATH,
		// Token: 0x04000F40 RID: 3904
		OUTEJA_AFTER_BREATH,
		// Token: 0x04000F41 RID: 3905
		EXTRACT,
		// Token: 0x04000F42 RID: 3906
		EXTRACT_FELLATIO,
		// Token: 0x04000F43 RID: 3907
		EXTRACT_IRRUMATIO,
		// Token: 0x04000F44 RID: 3908
		COUGH,
		// Token: 0x04000F45 RID: 3909
		DRINK,
		// Token: 0x04000F46 RID: 3910
		VOMIT,
		// Token: 0x04000F47 RID: 3911
		SHOW_ORAL,
		// Token: 0x04000F48 RID: 3912
		NUM
	}
}
